package com.weseal.dry.domain;

import common.data.BaseDomain;
import common.enums.CategoryEnum;
import org.springframework.context.annotation.Profile;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.List;
import java.util.Locale;

/**
 * @title
 * @description
 * @usage
 * @copyright Copyright 2014  rrmj Corporation. All rights reserved.
 * @company 上海众多美网络科技有限公司
 * @author weseal
 * @create 2018/4/15
 */
@Document(collection = "goods")
@CompoundIndexes({
		@CompoundIndex(name = "goodsName_createTime", def = "{'goodsName': 1, 'createTime': -1}")
})
public class GoodsDomain extends BaseDomain {

	private String goodsName;
	@Field("category")
	private CategoryEnum category;
	private double goodsPrice;
	private String description;
	private List<String> imageUrlList;
	@Field("specificationList")
	private List<SpecificationDomain> specificationList;


	public String getGoodsName() {
		return goodsName;
	}

	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}

	public double getGoodsPrice() {
		return goodsPrice;
	}

	public void setGoodsPrice(double goodsPrice) {
		this.goodsPrice = goodsPrice;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public List<String> getImageUrlList() {
		return imageUrlList;
	}

	public void setImageUrlList(List<String> imageUrlList) {
		this.imageUrlList = imageUrlList;
	}

	public List<SpecificationDomain> getSpecificationList() {
		return specificationList;
	}

	public void setSpecificationList(List<SpecificationDomain> specificationList) {
		this.specificationList = specificationList;
	}

	public CategoryEnum getCategory() {
		return category;
	}

	public void setCategory(CategoryEnum category) {
		this.category = category;
	}
}
